import { createApp } from 'vue'
import App from './App.vue'

import {router} from './router/index'

import Vant from 'vant';
import 'vant/lib/index.css';


import element from 'element-plus'
import 'element-plus/theme-chalk/index.css'

// router.beforeEach((to,from,next)=>{
//     let white = ['/login']
//     if(white.indexOf(to.path)>=0){
//         next()
//     }else{
//         // 获取该用户资源表
//         let pagelist = localStorage.getItem('page_def')
//         if(JSON.parse(pagelist)){
//             let reslist = JSON.parse(pagelist)
//             if(reslist.indexOf(to.path)>=0){
//                 next()
//             }else{
//                 alert("您无权访问")
//                 return false;
//             }
//         }
        
//     }
// })






const app = createApp(App)
app.use(router)
app.use(Vant);
app.use(element)



app.mount('#app')




// createApp(App).mount('#app')
